#ifndef ADPCM_CAPTURER_RENDER_H
#define ADPCM_CAPTURER_RENDER_H

class CAudioInputPin;

class CAdpcmCaptureRender : public CBaseFilter, public CCritSec
{

public:
    // Implements the IBaseFilter and IMediaFilter interfaces
    DECLARE_IUNKNOWN

    STDMETHODIMP Stop();
    STDMETHODIMP Pause();
    STDMETHODIMP Run(REFERENCE_TIME tStart);

public:

    CAdpcmCaptureRender(LPUNKNOWN pUnk,HRESULT *phr, HAUDIOSESSION sessionId, CaptureAudioCallBack callback, int channels, int sampleRate, int bitrate, AudioCodecId codecId, int bitsPerSample = 16);
    virtual ~CAdpcmCaptureRender();

    // Return the pins that we support
    int GetPinCount();
    CBasePin *GetPin(int n);

    // This goes in the factory template table to create new instances
    static CUnknown * WINAPI CreateInstance(LPUNKNOWN, HRESULT *);

    STDMETHODIMP JoinFilterGraph(IFilterGraph * pGraph, LPCWSTR pName);

	void SetVolume(UINT volume) { m_volume = volume;}
	UINT GetVolume() { return m_volume;}

private:
    // The nested classes may access our private state
    friend class CAudioInputPin;

	UINT m_volume;
	AudioCodecId m_codecId;
    CAudioInputPin *m_pInputPin;   // Handles pin interfaces
}; 

#endif
